﻿using System;

namespace Shell.PocoDot.Attributes
{
    /// <summary>
    /// 用于将一个 Poco 标识为一个 PocoDot
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
    public class PocoDotAttribute : Attribute
    {
        /// <summary>
        /// 创建一个新的实例
        /// </summary>
        /// <param name="providerName">持久化提供器的名称</param>
        public PocoDotAttribute(string providerName)
        {
            this.ProviderName = providerName;
        }

        /// <summary>
        /// 获取或设置持久化提供器的名称
        /// </summary>
        public string ProviderName { get; private set; }
    }
}
